<%@ page language="java" errorPage="error.jsp" pageEncoding="UTF-8"
	contentType="text/html;charset=utf-8"%>
<%@ include file="Common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<%@ include file="Common/metalink.jsp"%>
<script src="Scripts/common.js" type="text/javascript"></script>
</head>
<body>
<!-- start of wrapper-->
<div class=" Wrapper">
<%@ include file="Common/header.jsp"%>
<%@ include file="Common/menu.jsp"%>
    <!-- start of content -->
    <div class="Content">
        <div class="Right">
            <form id="_form" action=${empty inBean.id?"addbug.html":"updbug.html" } method="post">
            <input name="inBean.id" type="hidden" value="${inBean.id }" />
            <div class="Bugicon Midbox">
				Bug${empty inBean.id?"追加":"修改" }
            </div>
            <!--start of solution-->
            <div class="Solution Insert ">
                <p class="Gray box">
                    <label>Bug标题<font color="red">*</font></label>
                    <input id="title" name="inBean.title" value="${inBean.title }" type="text" size="50" style="width:580px;"/>
                </p>
                <p class="Gray box">
                    <label>模块<font color="red">*</font></label>
                    <select name="inBean.module" id="s_moudle" onchange="SelectM();">
                    <c:forEach var="module" items="${moduleMap }">
                    	<option value="${module.key }" ${inBean.module == module.key?"selected='selected'":""}>${module.value }</option>
                    </c:forEach>
                    </select>
                </p>
                <p class="Gray box">
                    <label>程序<font color="red">*</font></label>
                    <select name="inBean.program">
                    <c:forEach var="program" items="${programMap }">
                    	<option value="${program.key }" ${inBean.program == program.key?"selected='selected'":""}>${program.value }</option>
                    </c:forEach>
                    </select>
                </p>
                <p class="Gray box">
                    <label>种类<font color="red">*</font></label>
                    <select name="inBean.bugCategroy">
                    <c:forEach var="categroy" items="${categroyMap }">
                    	<option value="${categroy.key }" ${inBean.bugCategroy == categroy.key?"selected='selected'":""}>${categroy.value }</option>
                    </c:forEach>
                    </select>
                </p>
                <p class="Gray box NoneBorder">
                    <label>优先级<font color="red">*</font></label>
                    <select name="inBean.priority">
                   	<c:forEach var="priority" items="${priorityMap }">
                    	<option value="${priority.key }" ${inBean.priority == priority.key?"selected='selected'":""} >${priority.value }</option>
                    </c:forEach>
                    </select>
                </p>
                <c:if test="${empty inBean.id}">
                <p class="Gray box">
                    <label>处理人<font color="red">*</font></label>
                    <select name="inBean.handler" id="s_handler">
                        <c:forEach var="handler" items="${handlerMap }">
                        	<option value="${handler.key }" ${inBean.handler == handler.key?"selected='selected'":""}>${handler.value }</option>
                        </c:forEach>
                    </select>
                </p>
                </c:if>
                <div class="Gray box Detail">
                    <label>内容<font color="red">*</font></label>
                    <p class="Gray box">
                        <textarea cols="80" id="bugContent" name="inBean.bugContent" rows="5">${inBean.bugContent }</textarea> 
                    </p>
                    <div class="clear">
                        <!-- -->
                    </div>
                </div>
                <c:if test="${not empty inBean.id and inBean.status <= 1}">
                <p class="Gray box">
                    <label>重新分配</label>
                    <input type="checkbox" id="c_rehandle" onclick="ReAssign();" name="reassignFlg" value="0" />
                    <select name="inBean.handler" id="s_handler" disabled="disabled">
                        <c:forEach var="handler" items="${handlerMap }">
                        	<option value="${handler.key }" ${inBean.handler == handler.key?"selected='selected'":""}>${handler.value }</option>
                        </c:forEach>
                    </select>
                </p>
                <p class="Gray box" id="a_content" style="display: none;">
                    <label>备注</label>
                    <textarea rows="3" name="inBean.memo" id="content" cols="30"></textarea>
                </p>
                </c:if>
                <p class="Gray box">
                    <label>&nbsp;</label>
                    <a href="javascript:SubmitForm('_form');" class=" Buttom  icon_bigest"><span>提交</span></a>
                    <a href="javascript:history.go(-1);" class="Buttom"><span> 返回</span></a>
                </p>
                <div class="clear">
                    <!-- -->
                </div>
            </div>
            </form>
            <!--end of solution-->
        </div>
        <div class="clear">
            <!-- -->
        </div>
    </div>
	<!-- end of content -->
	<div class="clear">
		<!-- -->
	</div>
	<br />

</div>
<!-- end of wrapper-->
<%@ include file="Common/footer.jsp"%>
 
<script type="text/javascript">
	function ReAssign()
	{ 
		if(document.getElementById("c_rehandle").checked)
		{
			document.getElementById("s_handler").disabled=false;
			document.getElementById("a_content").style.display="block";
		}
		else
		{
			document.getElementById("s_handler").disabled=true;
			document.getElementById("a_content").style.display="none";
		}
	}
</script>

</body>
</html>